import Layout from '@/layouts/index.vue'

export const routes = [
    {
        path: '/',
        component: Layout,
        redirect: '/dashboard',
        children: [
            {
                path: '/dashboard',
                name: 'Dashboard',
                component: () => import('@/views/dashboard/index.vue'),
                meta: { title: '仪表盘', icon: 'House' }
            }
        ]
    },
    {
        path: '/mes',
        component: Layout,
        redirect: '/mes/workstation-board',
        meta: { title: '生产执行', icon: 'Cpu' },
        children: [
            {
                path: '/mes/workstation-board',
                name: 'WorkstationBoard',
                component: () => import('@/views/mes/workstation-board/index.vue'),
                meta: { title: '工位看板' }
            },
            {
                path: '/mes/pplan-management',
                name: 'PplanManagement',
                component: () => import('@/views/mes/pplan-management/index.vue'),
                meta: { title: '生产计划管理' }
            },
            {
                path: '/mes/task-pool',
                name: 'TaskPool',
                component: () => import('@/views/mes/task-pool/index.vue'),
                meta: { title: '全局任务池' }
            },
            {
                path: '/mes/forecast',
                name: 'ProductionForecast',
                component: () => import('@/views/mes/forecast/index.vue'),
                meta: { title: '生产预测' }
            }
        ]
    },
    {
        path: '/system',
        component: Layout,
        redirect: '/system/product',
        meta: { title: '基础数据', icon: 'Setting' },
        children: [
            {
                path: '/system/product',
                name: 'ProductManagement',
                component: () => import('@/views/system/product/index.vue'),
                meta: { title: '产品管理' }
            },
            {
                path: '/system/workstation',
                name: 'WorkstationManagement',
                component: () => import('@/views/system/workstation/index.vue'),
                meta: { title: '工位管理' }
            },
            {
                path: '/system/wkproc',
                name: 'WkprocManagement',
                component: () => import('@/views/system/wkproc/index.vue'),
                meta: { title: '工序管理' }
            },
            {
                path: '/system/config',
                name: 'SystemConfig',
                component: () => import('@/views/system/config/index.vue'),
                meta: { title: '系统配置' }
            }
        ]
    }
]
